<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>计算器</title>
	</head>
	<body>
		<input type="" name="" id="1" value="" />
		<select>
			<option value ="add">+</option>
			<option value ="substract ">-</option>
			<option value ="ride">*</option>
			<option value ="divide">%</option>
		</select>
		<input type="" name="" id="2" value="" />
		=
		<input type="" name="" id="3" value="" />
	    <button type="button" onclick="count">确定</button>
	</body>
	<script type="text/javascript">
		function count(){
			if(value="add"){
			  var a= document.getElementById('1').value;
			  var b= document.getElementById('2').value ;
			  document.getElementById('3').value=a+b;
			  
			}
			if (value="substract"){
				
			}
			if (value="ride"){
				
			}
			if (value="divide"){
				
			}
			
			
		}
		
	</script>
</html>
